package t;

import cn.hutool.core.bean.BeanUtil;
import org.apache.poi.ss.formula.functions.T;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class TUtil<T> {

    public List<T> getTs(List<Map<String ,Object>> maps , Class<T> tClass){
        return maps.stream().map(info -> {
            try {
                T t = tClass.newInstance();
                T opsProfessorPurposeValExcel =BeanUtil.fillBeanWithMapIgnoreCase(info, t,false);
                return opsProfessorPurposeValExcel;
            } catch (InstantiationException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
            return null;
        }).collect(Collectors.toList());
    };


}
